Skip to content

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Jun 12, 2025

Backport of #129150 to 8.19

…nce endpoints (elastic#129150)

This introduces a `none` chunking strategy that disables automatic chunking when using an inference endpoint.
It enables users to provide pre-chunked input directly to a `semantic_text` field without any additional splitting.

The chunking strategy can be configured either on the inference endpoint or directly in the `semantic_text` field definition.

**Example:**

```json
PUT test-index
{
  "mappings": {
    "properties": {
      "my_semantic_field": {
        "type": "semantic_text",
        "chunking_settings": {
          "strategy": "none"    <1>
        }
      }
    }
  }
}
```

<1> Disables automatic chunking on `my_semantic_field`.

```json
PUT test-index/_doc/1
{
    "my_semantic_field": ["my first chunk", "my second chunk", ...]    <1>
    ...
}
```

<1> Pre-chunked input provided as an array of strings.
Each array element represents a single chunk that will be sent directly to the inference service without further processing.
Copy link
Contributor

Documentation preview:

@jimczi jimczi added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Jun 12, 2025
@elasticsearchmachine elasticsearchmachine merged commit d7bcda3 into elastic:8.19 Jun 12, 2025
16 checks passed
@jimczi jimczi deleted the backport_129150_819 branch June 12, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >feature :ml Machine learning v8.19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants